import axiosData from '@/api/axios';

export default {
  queryPageByCondition(params) {
    return axiosData.post('/v3/40089-process-v2/batch/queryPageByCondition', params);
  },
  generateNo() {
    return axiosData.get(`v3/noService/configCode/generateNo?organizationNo=${sessionStorage.organizationNo}&noType=PROCESSBATCH`);
  },
  queryBomByProduct(processingVolume, productId) {
    return axiosData.get(`/v3/40089-process-v2/batch/queryBomByProduct?processingVolume=${processingVolume}&productId=${productId}`);
  },
  add(params) {
    return axiosData.post(`/v3/40089-process-v2/batch/add`, params);
  },
  edit(params) {
    return axiosData.post(`/v3/40089-process-v2/batch/edit`, params);
  },
  delListByIdList(params) {
    return axiosData.post(`/v3/40089-process-v2/batch/delListByIdList`, params);
  },
  closeBatch(params) {
    return axiosData.post(`/v3/40089-process-v2/batch/closeBatch`, params);
  },
  finishBatch(params) {
    return axiosData.post(`/v3/40089-process-v2/batch/finishBatch`, params);
  },
  queryByCondition(params) {
    return axiosData.post(`/v3/40089-process-v2/batch/queryByCondition`, params);
  },
  queryNumByBatchId(params) {
    return axiosData.get(`/v3/40089-process-v2/batch/queryNumByBatchId`, { params });
  }
};
